from string import capwords
from core.basic.skill import 技能
from core.basic.character import Character
from core.basic.skill import 主动技能, 被动技能
from math import *


# 封印解除，部分技能等级+1
class 主动技能(主动技能):

    关联技能 = ['刀魂之卡赞', '冰霜之萨亚', '侵蚀之普戾蒙', '鬼斩', '瘟疫之罗刹', '冥炎之卡洛']

    def 基础等级计算(self):
        if self.基础等级 == 0:
            super().基础等级计算()
            if self.所在等级 not in [50, 85, 100] and self.是否主动 == 1:
                self.基础等级 = min(self.基础等级 + 1, self.等级上限)


class 技能0(被动技能):
    名称 = '基础精通'
    倍率 = 1.0
    所在等级 = 1
    等级上限 = 200
    关联技能 = ['残影之凯贾']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0*ceil(1/10)
        else:
            return round(self.倍率 * (0.463 + 0.089 * self.等级), 5)


class 技能1(主动技能):
    名称 = '鬼斩'
    备注 = '鬼神冠冕'
    所在等级 = 1
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    MP = [17, 196]
    data0 = [int(i) for i in [0, 1001, 1124, 1249, 1371, 1493, 1614, 1738, 1864, 1987, 2109, 2229, 2356, 2474, 2595, 2718, 2844, 2963, 3086, 3211, 3330, 3459, 3581, 3701, 3824, 3947, 4068, 4194, 4315, 4438, 4559, 4683, 4804, 4931,
                              5054, 5174, 5296, 5418, 5543, 5664, 5787, 5908, 6030, 6155, 6277, 6399, 6524, 6646, 6768, 6893, 7015, 7137, 7260, 7385, 7503, 7630, 7750, 7873, 7999, 8120, 8242, 8365, 8488, 8608, 8733, 8854, 8974, 9097, 9223, 9344, 9469]]
    hit0 = 1
    data1 = [int(i) for i in [0, 973, 1094, 1216, 1335, 1452, 1570, 1690, 1812, 1932, 2050, 2167, 2287, 2407, 2526, 2648, 2766, 2883, 3001, 3123, 3242, 3366, 3481, 3601, 3718, 3839, 3957, 4081, 4199, 4316, 4434, 4554, 4674, 4797,
                              4914, 5032, 5149, 5271, 5390, 5511, 5631, 5748, 5866, 5987, 6107, 6225, 6346, 6463, 6581, 6704, 6822, 6940, 7060, 7183, 7299, 7419, 7540, 7657, 7778, 7900, 8016, 8135, 8255, 8372, 8494, 8614, 8730, 8849, 8973, 9088, 9212]]
    hit1 = 1
    CD = 6.0
    TP成长 = 0.10
    TP上限 = 7

    def TP加成(self):
        return 1.0

    # 噬灵鬼斩额外加成倍率，TP只加成鬼斩部分
    def 等效百分比(self, **argv):
        武器类型 = argv.get('武器类型', '')
        char: Character = argv.get('char', {})
        self.power0 = 1 + self.TP等级*self.TP成长
        self.power1 = char.get_skill_by_name("噬灵鬼斩").额外倍率()
        return super().等效百分比(**argv)


class 技能2(被动技能):
    名称 = '刀魂之卡赞'
    是否主动 = 1
    所在等级 = 5
    等级上限 = 20
    学习间隔 = 3
    等级精通 = 10
    MP = [10, 400]
    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.04 + 0.01 * self.等级, 5)


class 技能3(主动技能):
    名称 = '月光斩'
    备注 = '鬼神冠冕'
    所在等级 = 1
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    MP = [17, 182]
    data0 = [int(i) for i in [0, 533, 585, 640, 694, 748, 802, 856, 909, 963, 1019, 1072, 1126, 1180, 1234, 1288, 1342, 1395, 1450, 1505, 1558, 1612, 1667, 1720, 1774, 1828, 1881, 1936, 1991, 2044, 2098, 2153, 2206, 2260, 2314,
                              2367, 2423, 2477, 2530, 2584, 2638, 2692, 2746, 2799, 2854, 2909, 2962, 3016, 3071, 3124, 3178, 3232, 3285, 3340, 3395, 3448, 3502, 3557, 3610, 3664, 3718, 3771, 3826, 3881, 3934, 3988, 4043, 4096, 4150, 4204, 4258]]
    hit0 = 1
    data1 = [int(i) for i in [0, 602, 664, 724, 786, 846, 908, 970, 1031, 1093, 1152, 1214, 1275, 1336, 1397, 1458, 1520, 1580, 1642, 1702, 1763, 1824, 1886, 1948, 2008, 2070, 2132, 2192, 2254, 2314, 2376, 2436, 2498, 2560,
                              2619, 2681, 2742, 2804, 2863, 2925, 2987, 3048, 3110, 3171, 3232, 3293, 3354, 3416, 3477, 3537, 3599, 3660, 3720, 3781, 3843, 3905, 3965, 4026, 4087, 4149, 4211, 4272, 4333, 4393, 4455, 4516, 4577, 4638, 4699, 4761, 4821]]
    hit1 = 1
    data2 = [int(i) for i in [0, 846, 932, 1019, 1103, 1190, 1275, 1361, 1447, 1534, 1619, 1706, 1791, 1876, 1963, 2047, 2134, 2221, 2307, 2391, 2478, 2564, 2650, 2735, 2822, 2909, 2992, 3079, 3165, 3251, 3337, 3422, 3509, 3595,
                              3679, 3766, 3853, 3937, 4024, 4110, 4195, 4281, 4367, 4454, 4540, 4625, 4712, 4797, 4883, 4969, 5054, 5141, 5228, 5312, 5398, 5485, 5569, 5656, 5742, 5828, 5914, 5999, 6085, 6171, 6257, 6344, 6429, 6515, 6600, 6686, 6773]]
    hit2 = 1
    CD = 4.0
    TP成长 = 0.10
    TP上限 = 7


class 技能4(被动技能):
    名称 = '侵蚀之普戾蒙'
    是否主动 = 1
    所在等级 = 15
    等级上限 = 11
    学习间隔 = 3
    等级精通 = 1
    MP = [40, 644]
    关联技能 = ['所有']

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.23 + 0.01 * self.等级, 5)


class 技能5(被动技能):
    名称 = '太刀精通'
    所在等级 = 15
    等级上限 = 40
    学习间隔 = 3
    等级精通 = 30
    关联技能 = ['所有']
    data0 = [0, 13, 28, 41, 54, 68, 82, 96, 109, 123, 137, 150, 164, 177, 191, 205, 219, 233, 245, 259, 273, 287, 301, 314, 328, 341, 355, 369, 382, 396, 410, 424, 437, 450, 464, 478,
             492, 506, 520, 532, 546, 560, 574, 588, 601, 615, 628, 642, 656, 669, 683, 697, 711, 724, 737, 751, 765, 779, 793, 806, 819, 833, 847, 861, 874, 888, 902, 915, 929, 942, 956]

    def 魔法攻击力倍率(self, 武器类型):
        if 武器类型 == '太刀':
            return self.data0[self.等级] / 1000 + 1
        else:
            self.关联技能 = ['无']
            return 1.0


class 技能6(被动技能):
    名称 = '短剑精通'
    所在等级 = 15
    等级上限 = 40
    学习间隔 = 3
    等级精通 = 30
    关联技能 = ['所有']
    data0 = [0, 12, 26, 39, 51, 64, 77, 90, 103, 116, 129, 141, 154, 167, 180, 193, 206, 219, 231, 244, 257, 270, 283, 296, 309, 321, 334, 347, 360, 373, 386, 399, 411, 424, 437, 450,
             463, 476, 489, 501, 514, 527, 540, 553, 566, 579, 591, 604, 617, 630, 643, 656, 669, 681, 694, 707, 720, 733, 746, 759, 771, 784, 797, 810, 823, 836, 849, 861, 874, 887, 900]

    def 魔法攻击力倍率(self, 武器类型):
        if 武器类型 == '短剑':
            return self.data0[self.等级] / 1000 + 1
        else:
            self.关联技能 = ['无']
            return 1.0


class 技能7(被动技能):
    名称 = '暗月降临'
    所在等级 = 15
    等级上限 = 20
    学习间隔 = 5
    等级精通 = 10
    关联技能 = ['所有']
    暗抗 = [0, 3, 6, 9, 12, 15, 18, 21, 24, 27, 30,
          35, 40, 45, 50, 55, 60, 65, 70, 75, 80]

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1+0.01 * self.等级, 5)

    def 等级加成(self, x, char: Character = {}):
        if self.等级 != 0:
            if self.等级 + x > self.等级上限:
                self.等级 = self.等级上限
                if self.基础等级 != self.等级上限 and self.关联技能 != ['无']:
                    self.等级溢出 = 1
            else:
                char.所有属性抗性加成(-self.暗抗[self.等级])
                self.等级 += x
                char.所有属性抗性加成(self.暗抗[self.等级])


class 技能8(主动技能):
    名称 = '残影之凯贾'
    备注 = '(平x一轮)'
    所在等级 = 20
    等级上限 = 20
    学习间隔 = 3
    等级精通 = 10
    MP = [194, 2125]
    data0 = [int(i) for i in [0, 112, 112, 112, 112, 112, 112, 112,
                              112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, 112]]
    hit0 = 1
    data1 = [int(i) for i in [0, 129, 129, 129, 129, 129, 129, 129,
                              129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, 129]]
    hit1 = 1
    data2 = [int(i) for i in [0, 151, 151, 151, 151, 151, 151, 151,
                              151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151, 151]]
    hit2 = 1
    data3 = [int(i) for i in [0, 167, 167, 167, 167, 167, 167, 167,
                              167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167, 167]]
    hit3 = 1
    CD = 1.0
    TP成长 = 0.10
    TP上限 = 5  # 基础精通


class 技能9(被动技能):
    名称 = '噬灵鬼斩'
    所在等级 = 25
    等级上限 = 5
    基础等级 = 1

    def 额外倍率(self):
        if self.等级 == 0:
            return 0.0
        else:
            return round(1.0 + 0.1 * self.等级, 5)


class 技能10(主动技能):
    名称 = '鬼影鞭'
    所在等级 = 30
    等级上限 = 70
    学习间隔 = 3
    等级精通 = 60
    MP = [55, 700]
    data0 = [int(i) for i in [0, 1314, 1524, 1734, 1944, 2154, 2363, 2573, 2783, 2992, 3202, 3412, 3621, 3831, 4041, 4251, 4460, 4670, 4879, 5089, 5299, 5509, 5719, 5927, 6138, 6347, 6558, 6767, 6975, 7186, 7395, 7606, 7815, 8025, 8234, 8445,
                              8654, 8863, 9074, 9282, 9493, 9702, 9913, 10122, 10331, 10541, 10750, 10961, 11170, 11381, 11589, 11799, 12009, 12219, 12429, 12637, 12847, 13057, 13267, 13477, 13687, 13896, 14106, 14315, 14525, 14735, 14944, 15154, 15364, 15574, 15783]]
    hit0 = 1
    data1 = [int(i) for i in [0, 3068, 3558, 4047, 4536, 5025, 5514, 6004, 6494, 6983, 7472, 7962, 8451, 8940, 9430, 9919, 10407, 10897, 11386, 11875, 12365, 12854, 13343, 13833, 14322, 14811, 15300, 15789, 16278, 16768, 17257, 17746, 18237, 18726, 19215,
                              19705, 20194, 20682, 21172, 21661, 22150, 22640, 23129, 23618, 24108, 24597, 25086, 25576, 26064, 26553, 27043, 27532, 28021, 28511, 29000, 29489, 29979, 30469, 30957, 31447, 31936, 32425, 32915, 33404, 33893, 34383, 34872, 35361, 35851, 36339, 36828]]
    hit1 = 1
    CD = 8.0
    TP成长 = 0.10
    TP上限 = 7


class 技能11(主动技能):
    名称 = '冰霜之萨亚'
    所在等级 = 30
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60
    MP = [150, 1260]
    data0 = [int(i) for i in [0, 669, 737, 805, 873, 941, 1009, 1077, 1145, 1213, 1281, 1349, 1417, 1485, 1553, 1621, 1689, 1757, 1825, 1893, 1961, 2029, 2097, 2165, 2233, 2301, 2369, 2437, 2504, 2573, 2641, 2708, 2777, 2845,
                              2912, 2980, 3049, 3116, 3184, 3253, 3320, 3388, 3457, 3524, 3592, 3661, 3728, 3796, 3865, 3932, 4000, 4069, 4136, 4204, 4273, 4339, 4407, 4476, 4543, 4611, 4680, 4747, 4815, 4884, 4951, 5019, 5088, 5155, 5223, 5292, 5359]]
    hit0 = 10
    CD = 15.0
    演出时间 = 5
    TP成长 = 0.10
    TP上限 = 7

    def TP加成(self):
        return 1.0

    def 等效CD(self, **argv):
        self.hit0 = ceil(10 / (1 - 0.07 * self.TP等级))
        return super().等效CD(**argv)


class 技能12(主动技能):
    名称 = '死亡墓碑'
    所在等级 = 35
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60

    data0 = [int(i) for i in [0, 978, 1076, 1176, 1275, 1374, 1473, 1572, 1671, 1771, 1869, 1968, 2068, 2167, 2265, 2365, 2464, 2564, 2663, 2761, 2861, 2961, 3060, 3160, 3258, 3357, 3457, 3556, 3654, 3754, 3853, 3952, 4051, 4150,
                              4250, 4349, 4447, 4547, 4646, 4745, 4845, 4944, 5043, 5143, 5242, 5340, 5440, 5539, 5638, 5737, 5836, 5936, 6035, 6134, 6233, 6332, 6431, 6531, 6629, 6728, 6828, 6928, 7026, 7126, 7225, 7324, 7424, 7522, 7622, 7721, 7820]]
    hit0 = 9
    CD = 18
    TP成长 = 0.10
    TP上限 = 5

    MP = [165, 1386]
    无色消耗 = 1


class 技能13(主动技能):
    名称 = '瘟疫之罗刹'
    所在等级 = 35
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60

    data0 = [int(i*1.051) for i in [0, 918, 1011, 1106, 1199, 1291, 1384, 1478, 1571, 1664, 1758, 1850, 1943, 2037, 2131, 2224, 2316, 2410, 2503, 2596, 2690, 2783, 2875, 2969, 3062, 3156, 3250, 3343,
                                    3435, 3528, 3622, 3715, 3808, 3902, 3994, 4087, 4182, 4275, 4368, 4460, 4554, 4647, 4740, 4834, 4927, 5019, 5113, 5207, 5300, 5394, 5487, 5579, 5672, 5766, 5859, 5952, 6045, 6138, 6232, 6326, 6419]]
    hit0 = 10
    CD = 20.0
    TP成长 = 0.10
    TP上限 = 5
    演出时间 = 5
    是否有护石 = 1

    MP = [154, 1293]
    无色消耗 = 1

    def 装备护石(self):
        self.倍率 *= 0.5 * 1.1 + 1.1 * 5 * 0.1 * 1.24

    def 护石描述(self):
        temp = "<font color='#FF00FF'>无尽瘟疫</font>"
        temp += "<br><br><font color='#68D5ED'>"
        temp += "[瘟疫之罗刹]<br>"
        temp += "施放时直接使罗刹分身附到敌人身上<br>"
        temp += "- 不设置召唤领域<br>"
        temp += "罗刹分身5秒内对附着的敌人造成持续伤害后爆炸<br>"
        temp += "- 多段攻击次数 -5次<br>"
        temp += "- 爆炸攻击力为腐蚀攻击力的500%<br>"
        temp += "腐蚀攻击力 +10%<br>"
        temp += "<br>-护石附加效果：<br>"
        temp += "寻敌范围 +30%<br>"
        temp += "爆炸攻击力 +24%"
        return temp


class 技能14(主动技能):
    名称 = '鬼斩：狂怒'
    所在等级 = 40
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60

    data0 = [int(i*1.052) for i in [0, 10426, 11484, 12540, 13598, 14656, 15714, 16772, 17829, 18887, 19944, 21002, 22061, 23118, 24176, 25234, 26292, 27350, 28406, 29464, 30522, 31580, 32638, 33696, 34753, 35810, 36868, 37926, 38984, 40041, 41099, 42157, 43214, 44273,
                                    45329, 46388, 47446, 48504, 49562, 50619, 51676, 52734, 53792, 54850, 55907, 56965, 58023, 59080, 60138, 61196, 62253, 63311, 64369, 65427, 66484, 67541, 68600, 69658, 70716, 71774, 72831, 73889, 74946, 76004, 77062, 78119, 79177, 80235, 81293, 82350, 83408]]
    hit0 = 1
    CD = 20.0
    TP成长 = 0.10
    TP上限 = 5
    演出时间 = 0.5
    是否有护石 = 1

    MP = [165, 1386]
    无色消耗 = 1

    def 装备护石(self):
        self.倍率 *= 1.35

    def 护石描述(self):
        temp = "<font color='#FF00FF'>灵魂呼啸</font>"
        temp += "<br><br><font color='#68D5ED'>"
        temp += "[鬼斩 : 狂怒]<br>"
        temp += "地面攻击后发动上斩， 生成对前方造成持续伤害的灵魂旋风<br>"
        temp += "- 灵魂旋风攻击力为[鬼斩 : 狂怒]攻击力的20%<br>"
        temp += "<br>-护石附加效果：<br>"
        temp += "灵魂旋风命中时将敌人聚到中心<br>"
        temp += "灵魂旋风范围 +30%<br>"
        temp += "灵魂旋风攻击力 +15%"
        return temp


class 技能15(主动技能):
    名称 = '鬼影闪'
    所在等级 = 40
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60

    data0 = [int(i) for i in [0, 8724, 9610, 10495, 11379, 12265, 13150, 14036, 14921, 15806, 16692, 17576, 18461, 19347, 20232, 21117, 22003, 22888, 23772, 24658, 25543, 26428, 27313, 28198, 29082, 29968, 30853, 31738, 32624, 33509, 34395, 35279, 36164, 37049,
                              37935, 38820, 39706, 40590, 41475, 42361, 43246, 44131, 45017, 45902, 46786, 47672, 48557, 49442, 50328, 51213, 52098, 52983, 53868, 54752, 55638, 56523, 57408, 58293, 59178, 60063, 60949, 61834, 62720, 63605, 64489, 65375, 66260, 67145, 68031, 68916, 69800]]
    hit0 = 1
    CD = 20
    TP成长 = 0.10
    TP上限 = 5

    MP = [200, 1680]
    无色消耗 = 1


class 技能16(主动技能):
    名称 = '冥炎之卡洛'
    所在等级 = 45
    等级上限 = 70
    学习间隔 = 2
    等级精通 = 60

    # 分身攻击力
    data0 = [int(i) for i in [0, 272, 301, 328, 356, 383, 410, 438, 465, 495, 522, 548, 576, 604, 631, 660, 687, 714, 742, 770, 797, 826, 852, 880, 908, 935, 962, 993, 1020, 1045, 1075, 1101, 1131, 1158, 1185, 1212,
                              1240, 1269, 1295, 1324, 1350, 1379, 1406, 1435, 1463, 1490, 1518, 1545, 1573, 1600, 1630, 1656, 1684, 1711, 1740, 1769, 1796, 1823, 1849, 1876, 1906, 1933, 1961, 1988, 2017, 2044, 2072, 2099, 2127, 2155, 2182]]
    hit0 = 3
    # 冥焰攻击力
    data1 = [int(i) for i in [0, 166, 184, 201, 218, 234, 252, 269, 285, 302, 319, 336, 354, 371, 387, 405, 420, 438, 457, 472, 490, 506, 523, 540, 557, 574, 591, 607, 624, 642, 658, 676, 692, 710, 727,
                              743, 760, 777, 794, 812, 828, 844, 863, 880, 896, 912, 931, 948, 962, 981, 998, 1016, 1031, 1048, 1067, 1085, 1098, 1115, 1133, 1151, 1167, 1185, 1202, 1216, 1234, 1252, 1269, 1286, 1303, 1319, 1338]]
    hit1 = 0
    CD = 1.0
    TP成长 = 0.10
    TP上限 = 5

    MP = [492, 4920]
    无色消耗 = 2

    形态 = ["分身", "冥炎"]

    def 形态变更(self, 形态, char: Character):
        if 形态 == '' and len(self.形态) > 0:
            形态 = self.形态[0]
        if 形态 == "分身":
            self.hit0 = 1
            self.hit1 = 0
            self.hit2 = 0
        if 形态 == "冥炎":
            self.hit0 = 0
            self.hit1 = 1
            self.hit2 = 0
        if 形态 == "爆炸":
            self.hit0 = 0
            self.hit1 = 0
            self.hit2 = 1
            self.data2 = self.data1


class 技能17(主动技能):
    名称 = '冥炎剑'
    所在等级 = 45
    等级上限 = 1
    等级精通 = 1

    data0 = [int(i*1.053) for i in [0, 1023, 1126, 1230, 1336, 1439, 1543, 1646, 1750, 1853, 1957, 2063, 2166, 2270, 2373, 2477, 2580, 2685, 2788, 2893, 2997, 3100, 3204, 3307, 3412, 3515, 3620, 3723, 3827, 3931, 4035, 4139, 4242,
                                    4347, 4450, 4554, 4657, 4762, 4866, 4969, 5073, 5177, 5281, 5385, 5489, 5592, 5696, 5800, 5903, 6009, 6112, 6216, 6319, 6423, 6526, 6630, 6736, 6839, 6943, 7046, 7150, 7253, 7358, 7463, 7566, 7670, 7773, 7877, 7980, 8085, 8188]]
    hit0 = 2
    data1 = [int(i*1.053) for i in [0, 1498, 1649, 1802, 1954, 2106, 2258, 2411, 2562, 2715, 2867, 3020, 3170, 3323, 3475, 3626, 3779, 3931, 4083, 4235, 4388, 4539, 4692, 4843, 4995, 5147, 5299, 5451, 5603, 5756, 5907, 6060, 6212, 6364, 6515,
                                    6668, 6819, 6971, 7124, 7275, 7428, 7580, 7732, 7884, 8037, 8187, 8340, 8492, 8644, 8796, 8948, 9100, 9252, 9405, 9556, 9709, 9860, 10012, 10164, 10317, 10468, 10620, 10773, 10924, 11077, 11229, 11382, 11532, 11685, 11837, 11989]]
    hit1 = 2
    data2 = [int(i*1.053) for i in [0, 3213, 3538, 3866, 4191, 4517, 4843, 5169, 5494, 5822, 6148, 6473, 6799, 7125, 7451, 7777, 8104, 8429, 8755, 9081, 9407, 9734, 10060, 10386, 10711, 11037, 11363, 11690, 12015, 12342, 12667, 12993, 13319, 13646, 13972,
                                    14298, 14624, 14949, 15275, 15602, 15928, 16253, 16580, 16905, 17231, 17559, 17884, 18210, 18536, 18862, 19187, 19514, 19840, 20166, 20491, 20818, 21143, 21470, 21797, 22122, 22448, 22774, 23100, 23426, 23752, 24078, 24404, 24729, 25056, 25382, 25708]]
    hit2 = 2
    data3 = [int(i*1.053) for i in [0, 5219, 5748, 6278, 6807, 7337, 7866, 8395, 8925, 9455, 9984, 10514, 11043, 11573, 12102, 12632, 13161, 13691, 14220, 14749, 15279, 15808, 16338, 16867, 17398, 17926, 18456, 18985, 19516, 20044, 20574, 21103, 21633, 22163, 22692,
                                    23221, 23751, 24281, 24810, 25339, 25869, 26399, 26928, 27457, 27986, 28517, 29047, 29575, 30104, 30635, 31164, 31693, 32222, 32752, 33282, 33812, 34340, 34870, 35400, 35930, 36458, 36988, 37518, 38048, 38576, 39106, 39636, 40166, 40695, 41223, 41754]]
    hit3 = 1
    CD = 45.0
    TP成长 = 0.10
    TP上限 = 5
    是否有护石 = 1

    MP = [492, 4920]
    无色消耗 = 2

    def 装备护石(self):
        self.倍率 *= 1.28

    def 护石描述(self):
        temp = "<font color='#FF00FF'>速效冥炎</font>"
        temp += "<br><br><font color='#68D5ED'>"
        temp += "[冥炎剑]<br>"
        temp += "施放时召唤冥炎剑立即斩击敌人<br>"
        temp += "斩击攻击范围 +30%<br>"
        temp += "斩击攻击力 +11%<br>"
        temp += "<br>-护石附加效果：<br>"
        temp += "按向前方向键时增加移动距离<br>"
        temp += "斩击攻击力 +17%"
        return temp


class 技能18(被动技能):
    名称 = '恐惧光环'
    所在等级 = 48
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.105 + 0.015 * self.等级, 5)


class 技能19(主动技能):
    名称 = '第七鬼神：邪神怖之拉修'
    所在等级 = 50
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40

    data0 = [int(i) for i in [0, 7252, 8934, 10616, 12297, 13980, 15661, 17343, 19024, 20707, 22389, 24070, 25751, 27433, 29116, 30798, 32478, 34160, 35843,
                              37525, 39206, 40888, 42569, 44252, 45933, 47615, 49297, 50979, 52660, 54342, 56024, 57707, 59387, 61069, 62751, 64433, 66116, 67797, 69478, 71160, 72843]]
    hit0 = 1
    power0 = 1.8
    data1 = [int(i) for i in [0, 9804, 12078, 14352, 16627, 18901, 21173, 23447, 25721, 27995, 30267, 32541, 34815, 37090, 39364, 41636, 43910, 46184, 48458,
                              50732, 53004, 55279, 57553, 59827, 62101, 64373, 66647, 68921, 71196, 73469, 75742, 78016, 80290, 82564, 84837, 87110, 89384, 91659, 93933, 96205, 98479]]
    hit1 = 1
    power1 = 1.8
    data2 = [int(i) for i in [0, 1953, 2405, 2858, 3310, 3764, 4216, 4670, 5122, 5576, 6028, 6481, 6933, 7387, 7839, 8293, 8745, 9199, 9651, 10104, 10556,
                              11009, 11462, 11915, 12368, 12821, 13274, 13726, 14180, 14632, 15086, 15538, 15992, 16444, 16898, 17349, 17803, 18255, 18709, 19161, 19615]]
    hit2 = 5
    倍率 = 1.1

    MP = [600, 5040]
    无色消耗 = 5


class 技能20(主动技能):
    名称 = '鬼斩：炼狱'
    所在等级 = 60
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    data0 = [int(i*1.05) for i in [0, 1396, 1539, 1681, 1822, 1964, 2105, 2248, 2389, 2530, 2672, 2814, 2957, 3098, 3240, 3381, 3523, 3665, 3806, 3948, 4090, 4233, 4374, 4515, 4657, 4799, 4941, 5082, 5224, 5366, 5507, 5650, 5791, 5933,
                                   6075, 6217, 6358, 6499, 6642, 6783, 6926, 7067, 7209, 7351, 7492, 7634, 7775, 7918, 8059, 8202, 8343, 8484, 8627, 8768, 8910, 9051, 9194, 9335, 9477, 9619, 9760, 9903, 10044, 10186, 10327, 10470, 10611, 10752, 10894, 11036, 11179]]
    hit0 = 1
    data1 = [int(i*1.05) for i in [0, 5433, 5985, 6536, 7087, 7638, 8190, 8742, 9293, 9843, 10394, 10945, 11498, 12049, 12600, 13151, 13702, 14255, 14805, 15356, 15907, 16458, 17011, 17562, 18113, 18664, 19215, 19768, 20318, 20869, 21420, 21971, 22524, 23075, 23626,
                                   24177, 24728, 25278, 25831, 26382, 26933, 27484, 28035, 28588, 29139, 29690, 30240, 30791, 31343, 31895, 32446, 32997, 33548, 34100, 34652, 35202, 35753, 36304, 36856, 37408, 37959, 38510, 39061, 39613, 40165, 40715, 41266, 41817, 42369, 42920, 43472]]
    hit1 = 2
    data2 = [int(i*1.05) for i in [0, 4657, 5130, 5602, 6075, 6547, 7020, 7492, 7965, 8437, 8910, 9383, 9855, 10327, 10800, 11273, 11744, 12217, 12690, 13163, 13634, 14107, 14580, 15053, 15524, 15997, 16470, 16943, 17415, 17887, 18360, 18833, 19305, 19777, 20250,
                                   20724, 21195, 21667, 22141, 22612, 23086, 23558, 24031, 24503, 24976, 25449, 25921, 26393, 26866, 27339, 27811, 28283, 28756, 29229, 29701, 30173, 30646, 31119, 31592, 32063, 32536, 33009, 33481, 33953, 34426, 34899, 35371, 35843, 36316, 36789, 37261]]
    hit2 = 1
    CD = 30.0
    TP成长 = 0.10
    TP上限 = 5
    是否有护石 = 1

    MP = [400, 1120]
    无色消耗 = 1

    def 装备护石(self):
        self.power2 = 1.43 * (1 + 0.09 * 5)
        self.CDR *= 0.9

    def 护石描述(self):
        temp = "<font color='#FF00FF'>刺骨炼狱</font>"
        temp += "<br><br><font color='#68D5ED'>"
        temp += "[鬼斩 : 炼狱]<br>"
        temp += "冥界刀刃命中时， 对敌人附着持续造成伤害的冥炎<br>"
        temp += "冥炎对敌人造成多段伤害后爆炸并消失<br>"
        temp += "- 删除僵直功能<br>"
        temp += "- 爆炸攻击力为原僵直解除时的爆炸攻击力<br>"
        temp += "- 多段攻击力为爆炸攻击力的9%<br>"
        temp += "<br>-护石附加效果：<br>"
        temp += "冥炎爆炸攻击力 +43%<br>"
        temp += "冷却时间 -10%"
        return temp


class 技能21(主动技能):
    名称 = '冥祭之沼'
    所在等级 = 70
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    data0 = [int(i*1.052) for i in [0, 17784, 19590, 21394, 23197, 25003, 26807, 28613, 30416, 32220, 34023, 35829, 37632, 39436, 41242, 43045, 44850, 46655, 48459, 50264, 52068, 53871, 55677, 57481, 59284, 61090, 62893, 64697, 66503, 68307, 70111, 71916, 73720, 75524, 77329, 79132,
                                    80937, 82741, 84545, 86351, 88155, 89960, 91764, 93568, 95372, 97177, 98980, 100785, 102588, 104393, 106198, 108003, 109807, 111611, 113416, 115219, 117024, 118828, 120632, 122438, 124241, 126046, 127851, 129655, 131459, 133264, 135067, 136872, 138677, 140480, 142285]]
    hit0 = 1
    CD = 40.0
    TP成长 = 0.10
    TP上限 = 5
    是否有护石 = 1

    MP = [822, 1726]
    无色消耗 = 2

    def 装备护石(self):
        self.倍率 *= 1.28

    def 护石描述(self):
        temp = "<font color='#FF00FF'>百鬼夜行</font>"
        temp += "<br><br><font color='#68D5ED'>"
        temp += "[冥祭之沼]<br>"
        temp += "墓碑爆炸时对周围队友施加鬼神之力， 10秒内增加10%的攻击速度<br>"
        temp += "爆炸攻击力 +11%<br>"
        temp += "<br>-护石附加效果：<br>"
        temp += "队友攻击速度 +5%<br>"
        temp += "爆炸攻击力 +17%"
        return temp


class 技能22(主动技能):
    名称 = '幽魂之布雷德'
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    data0 = [int(i*1.051) for i in [0, 358, 395, 431, 468, 503, 541, 577, 614, 650, 686, 723, 758, 795, 832, 869, 905, 942, 978, 1013, 1050, 1086, 1124, 1160, 1197, 1233, 1269, 1305, 1342, 1378, 1414, 1452, 1488, 1524, 1560,
                                    1597, 1633, 1670, 1706, 1743, 1779, 1815, 1852, 1888, 1925, 1961, 1997, 2034, 2071, 2107, 2143, 2180, 2216, 2252, 2288, 2325, 2362, 2399, 2435, 2471, 2507, 2543, 2580, 2616, 2654, 2690, 2727, 2762, 2799, 2835, 2871]]
    hit0 = 32
    data1 = [int(i*1.051) for i in [0, 3996, 4401, 4807, 5211, 5617, 6023, 6429, 6833, 7238, 7644, 8050, 8455, 8860, 9266, 9671, 10076, 10482, 10888, 11293, 11698, 12103, 12510, 12915, 13319, 13725, 14130, 14537, 14942, 15347, 15752, 16158, 16563, 16969, 17374,
                                    17779, 18185, 18589, 18996, 19401, 19807, 20211, 20617, 21022, 21429, 21833, 22239, 22644, 23049, 23456, 23860, 24266, 24671, 25077, 25481, 25888, 26293, 26699, 27103, 27509, 27915, 28320, 28725, 29130, 29536, 29941, 30347, 30752, 31158, 31563, 31968]]
    hit1 = 4
    data2 = [int(i*1.051) for i in [0, 22478, 24758, 27038, 29319, 31598, 33879, 36160, 38440, 40721, 43002, 45281, 47562, 49843, 52122, 54403, 56684, 58963, 61244, 63526, 65805, 68086, 70367, 72646, 74927, 77208, 79487, 81768, 84048, 86328, 88610, 90890, 93170, 95451, 97730, 100011,
                                    102292, 104571, 106852, 109133, 111412, 113694, 115975, 118254, 120535, 122815, 125095, 127376, 129656, 131936, 134217, 136498, 138778, 141059, 143339, 145619, 147900, 150180, 152460, 154741, 157021, 159301, 161583, 163863, 166143, 168423, 170704, 172984, 175264, 177544, 179825]]
    hit2 = 1
    CD = 40.0
    是否有护石 = 1

    MP = [580, 4500]
    无色消耗 = 3

    形态 = ["满", "秒C"]

    def 形态变更(self, 形态, char: Character):
        if 形态 == '' and len(self.形态) > 0:
            形态 = self.形态[0]
        if 形态 == "满":
            self.hit0 = 32
            if '幽魂之布雷德' in char.护石栏:
                self.hit0 = 24
                self.power1 = 1.61
                self.power2 = 1.41
        else:
            形态 == "秒C"
            self.hit0 = 4
            if '幽魂之布雷德' in char.护石栏:
                self.hit0 = 24
                self.power1 = 1.61
                self.power2 = 1.41

    def 装备护石(self):
        self.hit0 = 24
        self.power1 = 1.61
        self.power2 = 1.41


class 技能23(被动技能):
    名称 = '御鬼之极'
    所在等级 = 75
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.20 + 0.02 * self.等级, 5)


class 技能24(主动技能):
    名称 = '幽魂降临：式'
    所在等级 = 80
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    data0 = [int(i*1.05) for i in [0, 19806, 21814, 23824, 25834, 27842, 29852, 31861, 33872, 35880, 37889, 39899, 41907, 43916, 45927, 47936, 49945, 51954, 53964,
                                   55973, 57982, 59992, 62001, 64010, 66020, 68030, 70038, 72047, 74057, 76066, 78076, 80085, 82094, 84103, 86112, 88123, 90132, 92140, 94150, 96159, 98168]]
    hit0 = 1
    data1 = [int(i*1.05) for i in [0, 29708, 32723, 35736, 38751, 41764, 44778, 47793, 50806, 53820, 56833, 59849, 62862, 65876, 68891, 71904, 74918, 77931, 80946, 83959,
                                   86974, 89988, 93002, 96016, 99029, 102044, 105057, 108071, 111084, 114100, 117114, 120127, 123142, 126155, 129169, 132182, 135198, 138212, 141225, 144239, 147253]]
    hit1 = 1
    CD = 45.0
    是否有护石 = 1

    MP = [800, 6000]
    无色消耗 = 5

    def 装备护石(self):
        self.倍率 *= 1.34


class 技能25(主动技能):
    名称 = '王者号令：吉格降临'
    所在等级 = 85
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40

    data0 = [int(i*1.051) for i in [0, 18042, 22225, 26409, 30594, 34776, 38961, 43145, 47328, 51513, 55695, 59879, 64064, 68247, 72431, 76615, 80798, 84983, 89165, 93349, 97534, 101717, 105901, 110084, 114268, 118453, 122635, 126820, 131004, 135187, 139372, 143554, 147738, 151923, 156105,
                                    160290, 164474, 168657, 172842, 177024, 181208, 185393, 189576, 193760, 197943, 202127, 206312, 210494, 214678, 218863, 223046, 227230, 231413, 235597, 239782, 243964, 248148, 252333, 256516, 260701, 264883, 269067, 273252, 277435, 281619, 285802, 289986, 294171, 298353, 302537, 306722]]
    hit0 = 1
    data1 = [int(i*1.051) for i in [0, 902, 1111, 1320, 1529, 1738, 1946, 2157, 2366, 2575, 2784, 2994, 3203, 3412, 3621, 3830, 4039, 4248, 4458, 4667, 4876, 5085, 5294, 5504, 5714, 5922, 6131, 6340, 6549, 6760, 6968, 7177, 7387, 7595, 7805, 8014,
                                    8223, 8433, 8641, 8850, 9060, 9269, 9479, 9687, 9896, 10107, 10315, 10525, 10733, 10942, 11152, 11361, 11570, 11780, 11988, 12198, 12407, 12616, 12826, 13034, 13244, 13452, 13662, 13872, 14080, 14289, 14499, 14708, 14918, 15126, 15335]]
    hit1 = 15
    data2 = [int(i*1.051) for i in [0, 22553, 27781, 33012, 38241, 43472, 48700, 53931, 59160, 64390, 69620, 74850, 80080, 85309, 90539, 95769, 100998, 106228, 111458, 116686, 121917, 127146, 132377, 137605, 142836, 148065, 153295, 158524, 163755, 168983, 174214, 179444, 184674, 189903, 195133,
                                    200363, 205592, 210822, 216051, 221281, 226510, 231741, 236969, 242200, 247429, 252660, 257888, 263119, 268348, 273578, 278807, 284038, 289268, 294497, 299727, 304957, 310186, 315415, 320646, 325874, 331105, 336334, 341565, 346793, 352024, 357253, 362483, 367712, 372943, 378171, 383402]]
    hit2 = 1
    data3 = [int(i*1.051) for i in [0, 36085, 44452, 52819, 61186, 69555, 77923, 86289, 94656, 103025, 111393, 119759, 128127, 136495, 144863, 153229, 161597, 169965, 178333, 186699, 195067, 203434, 211803, 220169, 228537, 236904, 245273, 253640, 262007, 270374, 278743, 287111, 295477, 303844, 312213,
                                    320581, 328947, 337315, 345683, 354051, 362417, 370785, 379152, 387521, 395887, 404255, 412622, 420991, 429357, 437725, 446092, 454461, 462827, 471195, 479562, 487931, 496297, 504665, 513032, 521401, 529769, 538135, 546503, 554870, 563239, 571605, 579973, 588340, 596709, 605075, 613443]]
    hit3 = 1
    CD = 180.0

    MP = [2500, 5000]
    无色消耗 = 10


class 技能26(主动技能):
    名称 = '鬼神剑·黄泉摆渡'
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 2
    等级精通 = 40

    data0 = [int(i) for i in [0, 21220, 23373, 25526, 27679, 29832, 31985, 34137, 36291, 38443, 40596, 42749, 44903, 47054, 49208, 51361, 53514, 55666, 57820,
                              59972, 62125, 64278, 66431, 68584, 70737, 72889, 75043, 77194, 79347, 81501, 83654, 85806, 87959, 90113, 92264, 94418, 96570, 98724, 100876, 103029, 105182]]
    hit0 = 2
    data1 = [int(i) for i in [0, 10610, 11687, 12763, 13839, 14917, 15992, 17068, 18144, 19222, 20298, 21375, 22451, 23527, 24603, 25680, 26756, 27834, 28910,
                              29986, 31061, 32139, 33215, 34291, 35368, 36445, 37521, 38597, 39673, 40749, 41827, 42903, 43979, 45056, 46132, 47208, 48285, 49361, 50438, 51515, 52591]]
    hit1 = 1
    data2 = [int(i) for i in [0, 37136, 40903, 44672, 48439, 52206, 55974, 59741, 63508, 67277, 71044, 74811, 78579, 82346, 86113, 89881, 93649, 97416, 101184, 104951, 108719,
                              112486, 116253, 120022, 123789, 127556, 131324, 135091, 138858, 142627, 146394, 150161, 153929, 157696, 161463, 165232, 169000, 172768, 176535, 180302, 184070]]
    hit2 = 1
    data3 = [int(i) for i in [0, 3183, 3506, 3829, 4151, 4473, 4798, 5120, 5443, 5766, 6089, 6411, 6736, 7058, 7381, 7704, 8026, 8349, 8672, 8996,
                              9318, 9641, 9964, 10288, 10610, 10934, 11256, 11578, 11901, 12225, 12548, 12870, 13194, 13516, 13839, 14163, 14486, 14808, 15131, 15454, 15776]]
    hit3 = 5
    CD = 60.0

    MP = [1064, 7980]
    无色消耗 = 7


class 技能27(被动技能):
    名称 = '鬼神冠冕'
    所在等级 = 95
    等级上限 = 50
    学习间隔 = 3
    等级精通 = 40

    def 加成倍率(self, 武器类型):
        if self.等级 == 0:
            return 1.0
        else:
            return round(1.18 + 0.02 * self.等级, 5)


class 技能28(主动技能):
    名称 = '黄泉之门：万鬼度灵'
    所在等级 = 100
    等级上限 = 50
    学习间隔 = 5
    等级精通 = 40

    data0 = [int(i) for i in [0, 18024, 22202, 26383, 30562, 34742, 38921, 43102, 47280, 51460, 55640, 59818, 63999, 68178, 72358, 76537, 80717, 84896, 89075, 93256, 97434,
                              101615, 105794, 109973, 114153, 118332, 122512, 126691, 130872, 135050, 139230, 143410, 147588, 151769, 155948, 160128, 164307, 168487, 172666, 176846, 181026]]
    hit0 = 1
    data1 = [int(i) for i in [0, 108144, 133222, 158299, 183376, 208453, 233530, 258608, 283685, 308762, 333839, 358916, 383993, 409071, 434148, 459226, 484303, 509380, 534458, 559535,
                              584612, 609689, 634766, 659844, 684920, 709998, 735074, 760152, 785230, 810306, 835384, 860460, 885538, 910616, 935692, 960770, 985846, 1010924, 1036001, 1061078, 1086156]]
    hit1 = 2
    data2 = [int(i) for i in [0, 4805, 5921, 7035, 8149, 9265, 10379, 11492, 12608, 13722, 14836, 15952, 17066, 18180, 19296, 20410, 21524, 22639, 23754, 24867,
                              25981, 27097, 28211, 29325, 30441, 31555, 32669, 33785, 34899, 36013, 37129, 38242, 39356, 40471, 41586, 42700, 43814, 44930, 46044, 47158, 48274]]
    hit2 = 15
    data3 = [int(i) for i in [0, 6758, 8325, 9893, 11461, 13028, 14595, 16162, 17730, 19297, 20865, 22432, 23999, 25566, 27134, 28702, 30268, 31835, 33403,
                              34971, 36538, 38104, 39672, 41240, 42808, 44374, 45941, 47509, 49077, 50643, 52210, 53778, 55346, 56913, 58480, 60047, 61615, 63182, 64750, 66317, 67884]]
    hit3 = 8
    CD = 290.0

    MP = [4028, 8056]
    无色消耗 = 15


class classChange(Character):
    def __init__(self):
        self.实际名称 = 'soul_bender'
        self.名称 = '极诣·鬼泣'
        self.角色 = '鬼剑士(男)'

        self.职业 = '鬼泣'
        self.武器选项 = ['太刀', '短剑']
        self.输出类型选项 = ['魔法百分比']
        self.防具精通属性 = ['智力']
        self.类型 = '魔法百分比'
        self.武器类型 = '太刀'
        self.防具类型 = '布甲'
        技能列表 = []
        技能序号 = {}
        i = 0
        while i >= 0:
            try:
                tem = eval('技能'+str(i)+'()')
                tem.基础等级计算()
                技能序号[tem.名称] = i
                技能列表.append(tem)
                i += 1
            except:
                i = -1
        self.技能栏 = 技能列表
        self.技能序号 = 技能序号
        self.buff = 1.69

        super().__init__()

    def 技能队列设置(self, setinfo):
        self.技能队列 = []
        CP武器 = False
        for i in self.装备栏:
            if i in [418, 417]:
                CP武器 = True
        for item in setinfo:
            self.技能队列.append({
                '名称': item['name'],
                '无色消耗': self.get_skill_by_name(item['name']).无色消耗,
                '倍率': 1.0,
                '等级变化': 0,
                'CDR': 1.0,
                '形态': item.get('mode', '')
            })
            if CP武器:
                if item['name'] in ['鬼斩', '鬼斩：狂怒', '鬼影闪', '鬼斩：炼狱', '幽魂降临：式']:
                    self.技能队列.append({
                        '名称': '冥炎之卡洛',
                        '无色消耗': self.get_skill_by_name('冥炎之卡洛').无色消耗,
                        '倍率': 1.0,
                        '等级变化': 0,
                        'CDR': 1.0,
                        '形态': '爆炸'
                    })
                if item['name'] in ['月光斩', '鬼神剑·黄泉摆渡']:
                    self.技能队列.append({
                        '名称': '冥炎之卡洛',
                        '无色消耗': self.get_skill_by_name('冥炎之卡洛').无色消耗,
                        '倍率': 2.0,
                        '等级变化': 0,
                        'CDR': 1.0,
                        '形态': '爆炸'
                    })
                if item['name'] in ['冥炎剑']:
                    self.技能队列.append({
                        '名称': '冥炎之卡洛',
                        '无色消耗': self.get_skill_by_name('冥炎之卡洛').无色消耗,
                        '倍率': 4.0,
                        '等级变化': 0,
                        'CDR': 1.0,
                        '形态': '爆炸'
                    })

    def 职业特殊计算(self):
        冥炎剑 = self.get_skill_by_name('冥炎剑')
        冥炎剑.等级上限 = 70
        冥炎剑.等级 = self.get_skill_by_name('冥炎之卡洛').等级

    # 抗性有成长的较为特殊 需要按照以下进行添加
    def 职业特殊设置(self):
        暗月降临 = self.get_skill_by_name("暗月降临")
        self.所有属性抗性加成(暗月降临.暗抗[暗月降临.等级])
